<?php

class Public_Post_WriteInputView extends BlogPublicBaseView
{
	public function executeHtml(AgaviRequestDataHolder $rd)
	{
		$this->setupHtml($rd, 'blog');
		$ro = $this->getContext()->getRouting();
		
        $this->setAttribute('submit_route', $ro->gen('post.write'));
		$this->setAttribute('title', 'Write new post');

		$form_params = array(
		    'post_date' => date('Y-m-d H:i'),
		    'published' => 1,
		    'comments_allowed' => 1
		    );
		    
		$this->getContext()->getRequest()->setAttribute('populate',
            new AgaviParameterHolder($form_params),
            'org.agavi.filter.FormPopulationFilter');
	}
}

?>
